package g4h.android.monterhunt;

import java.util.ArrayList;

public class GameState {
	public enum State{
		intro(R.drawable.eye_turning_bad, R.string.intro),
		monster_located(R.drawable.other_agents_busy, R.string.monster_found),
		map(R.drawable.map, R.string.map),
		show_monster(R.drawable.eye_evil, R.string.close_to_monster),
		try_catch(R.drawable.eye_spin, R.string.instructions_to_defeat),
		monster_disappear(R.drawable.eye_sad, R.string.monster_defeated),
		congrats(R.drawable.eye_not_monster, R.string.congrats);
		
		private final int pic_resource;
		private final int string_resource;
		
		private State(int prsrc, int srsrc){
			pic_resource = prsrc;
			string_resource = srsrc;
		}
		public int getPicResource(){
			return pic_resource;
		}
		public int getStringResource(){
			return string_resource;
		}
	}
	
	private ArrayList<State> states;
	private Integer level;
	public GameState(){
		level = 0;
		states = new ArrayList<State>();
		
		states.add(State.intro);
		states.add(State.monster_located);
		states.add(State.map);
		states.add(State.show_monster);
		states.add(State.try_catch);
		states.add(State.monster_disappear);
		states.add(State.congrats);
	}
	
	public State getLevel() {
		return states.get(level);		
	}
	
	public void nextLevel() {
		if(level.equals(states.size() -1 )){ return;}
		level += 1;
	}
	
	public void previousLevel(){
		if(level.equals(0)){return;}
		level -= 1;
	}
	
	

}
